package com.crane.oss.enums;

import com.crane.common.core.utils.StringUtil;

/**
 *
 */
public enum DynamicCodeTypeEnum {
    /**
     * 验证码类型
     */
    LOGIN_CODE("loginCode", "登录验证码"),

    VERIFY_CODE("verifyCode", "动态验证码"),

    AUTH_CODE("authCode", "实名认证验证码"),

    FORGET_PASSWORD("forgetPwd", "忘记密码");

    private String value;

    private String remark;

    private DynamicCodeTypeEnum(String value, String remark) {
        this.value = value;
        this.remark = remark;
    }

    public String getValue() {
        return value;
    }

    public String getRemark() {
        return remark;
    }

    public static DynamicCodeTypeEnum getDynamicCodeTypeEnumByValue(String value) {
        if (StringUtil.isEmpty(value)) {
            return null;
        }
        for (DynamicCodeTypeEnum temp : DynamicCodeTypeEnum.values()) {
            if (temp.getValue().equals(value)) {
                return temp;
            }
        }
        return null;
    }
    
    public static void main(String []args) {
    	System.out.println(DynamicCodeTypeEnum.getDynamicCodeTypeEnumByValue("forgetPwd").getRemark());
    }

}
